<?php
    @include_once("conn.php");

    $search = "select *,chinese+math+english as total  from `grade`";

    $result = mysqli_query($conn,$search);

    // print_r($result);  // 结果对象(object)   php对象取值  对象->属性名
    // echo $result->num_rows;

    $all = array();
    while($item = mysqli_fetch_assoc($result)){
        // $item["chinese"] =$item["chinese"]*1;
        array_push($all,$item);
    }

    echo json_encode($all);



?>